package cn.waitsunshine.springframework.test;

import cn.waitsunshine.springframework.BeanDefinition;
import cn.waitsunshine.springframework.BeanFactory;
import cn.waitsunshine.springframework.test.bean.UserService;

/**
 * @description:
 * @Author: kai
 * @Date: 2025-01-30
 */
public class ApiTest {

	public static void main(String[] args) {
		//初始化bean
		BeanFactory beanFactory = new BeanFactory();

		BeanDefinition beanDefinition = new BeanDefinition(new UserService());
		beanFactory.registerBeanDefinition("userService",beanDefinition);

		UserService userService = (UserService)beanFactory.getBean("userService");
		userService.queryUserInfo();
	}
}
